package com.example.twoscroolview.activity

import android.app.ActionBar
import android.os.Bundle
import android.view.ViewGroup
import android.widget.LinearLayout
import android.widget.RelativeLayout
import android.widget.TextView
import androidx.appcompat.app.AppCompatActivity
import com.example.twoscroolview.R
import kotlinx.android.synthetic.main.activity_flow.*

class FlowActivity:AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_flow)


     //   addView()
    }


    private fun addView() {
        for (i in 0..10 ){
            val tv = TextView(this)
            val lp =
                ViewGroup.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT)
            lp
            tv.text="hello--$i"
            tv.layoutParams = lp
            flowLayout.addView(tv)
        }
    }
}